package net.sipvip.client;

import pl.rmalinowski.gwt2swf.client.ui.SWFWidget;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.DecoratorPanel;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.Grid;
import com.google.gwt.user.client.ui.Image;


public class RightImageBig extends Composite {
	public RightImageBig(String phone, String name, String imagestr, String city) {
		final String vimagestr = imagestr;
		DecoratorPanel decoratorpanel = new DecoratorPanel();
//		FlowPanel flowpanel = new FlowPanel();
//		decoratorpanel.add(flowpanel);
		grid = new Grid(4, 1);
//		content = new FlowPanel();
//		content = flowpanel;


//		decoratorpanel.add(grid);
//		initWidget(content);
		initWidget(grid);
		Image image = new Image(vimagestr);
//		image.s
		decoratorpanel.add(image);
//		SWFWidget swfWidget = new SWFWidget("/images/sn.swf", "200px", "220px");
//		swfWidget.addParam("wmode", "transparent");
//		swfWidget.addParam("quality", "high");
//		swfWidget.addAttribute("allowFullScreen", "true");
//		swfWidget.addFlashVar("allowFullScreen", "true");

		grid.setText(0, 0, phone);
		// TODO style
		grid.getCellFormatter().setStyleName(0, 0, "phoneBG");
		grid.setText(1, 0, name);
		// TODO style
		grid.getCellFormatter().setStyleName(1, 0, "nameBG");
		// TODO style flash
//		grid.setWidget(2, 0, image);
//		grid.setWidget(2,0, swfWidget);
//		grid.setWidget(2, 0, image);
		grid.setWidget(2, 0, decoratorpanel);
		// TODO style
		grid.getCellFormatter().setStyleName(2, 0, "imageBG");
		grid.setText(3, 0, city);
		// TODO style
		grid.getCellFormatter().setStyleName(3, 0, "cityBG");

//		content.add(grid);
//		content.add()

	}

	private FlowPanel content;
	private Grid grid;
}

